{include file="common/top" /}
<div style="padding: 20px;background: #ffffff;" >
	<form class="layui-form " action="">
	<div class="layui-form-item">
		<label class="layui-form-label">赔付编号：</label>
		<div class="layui-col-xs4">
			{$rs.code}
		</div>
		<label class="layui-form-label">*赔付类别：</label>
		<div class="layui-col-xs4">
			{switch name="rs.type"}
			    {case value="1"}赔付到客户备款{/case}
			    {case value="2"}赔付到账户{/case}
			    {case value="3"}赔付到客户{/case}
			    {default /}default
			{/switch}
		</div>
	</div>
	<div class="layui-form-item">
		<label class="layui-form-label">*媒介人员：</label>
		<div class="layui-col-xs4">
			{$rs.media_name}
		</div>
		<label class="layui-form-label">*运营人员：</label>
		<div class="layui-col-xs4">
			{$rs.operate_name}
		</div>
	</div>
	<div class="layui-form-item ">
		<label class="layui-form-label">*渠道名称：</label>
		<div class="layui-col-xs4">
			{$rs.channel_name}
		</div>
		<label class="layui-form-label">*账户名称：</label>
		<div class="layui-col-xs4">
			{$rs.account_name}
		</div>
	</div>
	<div class="layui-form-item pay4">
		<label class="layui-form-label">*客户名称：</label>
		<div class="layui-col-xs4">
			{$rs.customer_name}
		</div>
	</div>
	<div class="layui-form-item">
		<label class="layui-form-label">返点(%)：</label>
		<div class="layui-col-xs4">
			{$rs.rebate}
		</div>
		<label class="layui-form-label">服务费(%)：</label>
		<div class="layui-col-xs4">
			{$rs.service_pay}
		</div>
	</div>
	<div class="layui-form-item pay1" {eq name="rs.type" value="2"}style='display:none'{/eq}>
		<label class="layui-form-label">*赔付金额：</label>
		<div class="layui-col-xs4">
			{$rs.amount}
		</div>
	</div>
	<div class="layui-form-item pay2" {neq name="rs.type" value="2"}style='display:none'{/neq}>
		<label class="layui-form-label">*赔付账户币：</label>
		<div class="layui-col-xs4">
			{$rs.currency}
		</div>
	</div>
	<div class="layui-form-item">
		<label class="layui-form-label">*备注：</label>
		<div class="layui-col-xs8">
			<textarea autocomplete="off" readonly="readonly" placeholder="请输入详细备注" class="layui-textarea">{$rs.note}</textarea>
		</div>
	</div>
	<hr />
	<div class="layui-form-item">
		<div class="layui-input-block">
			<input type="hidden" name="id" value="{$rs.id}">
			<button class="layui-btn"  lay-submit="" lay-filter="demo1">审核通过</button>
		</div>
	</div>
	</form>
</div>
{include file="common/footer" /}

<script>
	var $,form,layer
	layui.use(['form', 'layedit', 'laydate'], function(){
		  form = layui.form ,layer = layui.layer,$ = layui.jquery;
		  
		  //监听提交
		  form.on('submit(demo1)', function(data){
			var articleFrom = data.field;
			layer.load(1, { shade : [ 0.5, '#676a6c' ] });
			$.post("{:url('audit_paid')}?t=json",articleFrom,function(data){
				layer.closeAll();
				if (data['code'] == 1) {
					var index1 = parent.layer.getFrameIndex(window.name); //先得到当前iframe层的索引
					parent.layer.close(index1); //再执行关闭 
					parent.get_load(data['msg']);
				} else {
					layer.msg(data['msg'], { icon : 5 });
				}
			});
			
			return false;
		  });
		
		
	});

	
	
	
</script>
